import React,{Suspense} from 'react';

import {BrowserRouter} from 'react-router-dom';

import RenderRouterView from './router.view';

import routerConfig from './router.config';

const Router:React.FC = function(){
    return <BrowserRouter>
        <Suspense fallback={<div>Loading...</div>}>
            {RenderRouterView(routerConfig)}
        </Suspense>
    </BrowserRouter>
}

export default Router